﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Edgar.Frontend.Wpf.CharacterSheet.Sections
{
    /// <summary>
    /// Interaction logic for SubscriptionField.xaml
    /// </summary>
    public partial class SubscriptionField : UserControl
    {
        private SubscriptionFieldWidth _SubscriptionFieldWidth;

        public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
            "Text", typeof(string), typeof(SubscriptionField));

        public SubscriptionField()
            : base()
        {
            InitializeComponent();
        }

        public string Text
        {
            get { return (string)this.GetValue(TextProperty); }
            set
            {
                this.SetValue(TextProperty, value);
            }
        }

        public string Subscription
        {
            get { return SubscriptionTextBlock.Text; }
            set { SubscriptionTextBlock.Text = value; }
        }

        public Visibility SubscriptionVisibility
        {
            get { return SubscriptionTextBlock.Visibility; }
            set { SubscriptionTextBlock.Visibility = value; }
        }

        public SubscriptionFieldWidth LineWidth
        {
            get { return _SubscriptionFieldWidth; }
            set
            {
                _SubscriptionFieldWidth = value;
                BlankLine.X2 = (double)value;
            }
        }
    }

    public enum SubscriptionFieldWidth
    {
        NumberShort = 25,
        DiceShort = 50,
        TextShort = 50,
        Number = 50,
        Dice = 75,
        Text = 100,
        NumberLong = 90,
        TextLong = 220
    }
}
